package com.my.chapter17;

import java.util.Map;

public class practice17 {
    public static void main(String[] args) {
        Map<Integer,String> map = new SlowMap2<Integer,String>();
        map.putAll(new CountingMapData(10));
        System.out.print("keys：");
        System.out.println(map.keySet());
        System.out.print("values：");
        System.out.println(map.values());
        System.out.println(map);
        System.out.println("map.containsKey(6): " + map.containsKey(6));
        System.out.println("map.get(6): " + map.get(6));
        System.out.println("map.containsValue(\"G0\"): "
                + map.containsValue("G0"));
        Integer key = map.keySet().iterator().next();
        System.out.println("First key in map: " + key);
        map.remove(key);
        System.out.println(map);
        map.clear();
        System.out.println("map.isEmpty(): " + map.isEmpty());
    }
}
